/*

 @name    : 锅巴汉化 - Web汉化插件
 @author  : 麦子、JAR、小蓝、好阳光的小锅巴
 @version : V0.6.1 - 2019-07-09
 @website : http://www.g8hh.com

*/

//1.汉化杂项
var cnItems = {
    _OTHER_: [],

    //未分类：
    'Save': '保存',
    'Export': '导出',
    'Import': '导入',
    'Settings': '设置',
    'Achievements': '成就',
    'Statistics': '统计',
    'Changelog': '更新日志',
    'Hotkeys': '快捷键',
    'ALL': '全部',
    'Default': '默认',
    'AUTO': '自动',
    'default': '默认',
    "points": "点数",
    "Reset for +": "重置得到 + ",
    "Currently": "当前",
    "Effect": "效果",
    "Cost": "成本",
    "Goal:": "目标:",
    "Reward": "奖励",
    "Start": "开始",
    "Exit Early": "提前退出",
    "Finish": "完成",
    "Milestone Gotten!": "获得里程碑！",
    "Milestones": "里程碑",
    "Completed": "已完成",
    "Notice: This is not my Game (only modified). The": "注意：这不是我的游戏（仅修改）。 ",
    "Original Game": "原始游戏",
    "Normal": "正常",
    "Max all (M": "全部最大 (M",
    "Max": "最大",
    "Load": "加载",
    "Infinity": "无限",
    "default": "默认",
    "highest dimensions.": "最高维度。",
    "lowest dimensions.": "最低维度。",
    "1st Dimension": "第 1 维度",
    "2nd Dimension": "第 2 维度",
    "3rd Dimension": "第 3 维度",
    "1st Infinity Dimension": "第 1 无限维度",
    "2nd Infinity Dimension": "第 2 无限维度",
    "3rd Infinity Dimension": "第 3 无限维度",
    "1st Eternity Dimension": "第 1 永恒维度",
    "2nd Eternity Dimension": "第 2 永恒维度",
    "3rd Eternity Dimension": "第 3 永恒维度",
    "1st Quantum Dimension": "第 1 量子维度",
    "2nd Quantum Dimension": "第 2 量子维度",
    "3rd Quantum Dimension": "第 3 量子维度",
    "1st Holy Dimension": "第 1 神圣维度",
    "2nd Holy Dimension": "第 2 神圣维度",
    "3rd Holy Dimension": "第 3 神圣维度",
    "1st Super Dimension": "第 1 超级维度",
    "2nd Super Dimension": "第 2 超级维度",
    "3rd Super Dimension": "第 3 超级维度",
    "1st Ultrum Dimension": "第 1 超凡维度",
    "2nd Ultrum Dimension": "第 2 超凡维度",
    "3rd Ultrum Dimension": "第 3 超凡维度",
    "1st Cosmic Dimension": "第 1 宇宙维度",
    "2nd Cosmic Dimension": "第 2 宇宙维度",
    "3rd Cosmic Dimension": "第 3 宇宙维度",
    "1st Reality Dimension": "第 1 现实维度",
    "2nd Reality Dimension": "第 2 现实维度",
    "3rd Reality Dimension": "第 3 现实维度",
    "Boost on every Dimension.": "在每个维度上提升。",
    "Boost on the previous layers": " 对前一层的提升",
    "by Dan-Simon can be played here.": "作者 Dan-Simon 可以在这里玩。",
    "Display": "显示",
    "Prestige gain: {{ generator.prestigeGain ? 'on' : 'off' }}": "声望增益: {{ generator.prestigeGain ? '打开' : '关闭' }}",
    "TRANSCENSION": "超越",
    "Transcend now to get {{formatWhole(getTranscensionGain())}} Transcendence Points": "现在超越可获得 {{formatWhole(getTranscensionGain())}} 超越点",
    "Eternity": "永恒",
    "Quantum": "量子",
    "Ultrum": "超凡",
    "Reality": "现实",
    "Super": "超级",
    "Holy": "神圣",
    "Cosmic": "宇宙",
    "dark": "深色",
    "default": "默认",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",

    //树游戏
    'Loading...': '加载中...',
    'ALWAYS': '一直',
    'HARD RESET': '硬重置',
    'Export to clipboard': '导出到剪切板',
    'INCOMPLETE': '不完整',
    'HIDDEN': '隐藏',
    'AUTOMATION': '自动',
    'NEVER': '从不',
    'ON': '打开',
    'OFF': '关闭',
    'SHOWN': '显示',
    'Play Again': '再次游戏',
    'Keep Going': '继续',
    'The Modding Tree Discord': '模型树Discord',
    'You have': '你有',
    'It took you {{formatTime(player.timePlayed)}} to beat the game.': '花费了 {{formatTime(player.timePlayed)}} 时间去通关游戏.',
    'Congratulations! You have reached the end and beaten this game, but for now...': '恭喜你！ 您已经结束并通关了本游戏，但就目前而言...',
    'Main Prestige Tree server': '主声望树服务器',
    'Reach {{formatWhole(ENDGAME)}} to beat the game!': '达到 {{formatWhole(ENDGAME)}} 去通关游戏!',
    "Loading... (If this takes too long it means there was a serious error!": "正在加载...（如果这花费的时间太长，则表示存在严重错误！",
    'Loading... (If this takes too long it means there was a serious error!)←': '正在加载...（如果时间太长，则表示存在严重错误！）←',
    'Main\n\t\t\t\tPrestige Tree server': '主\n\t\t\t\t声望树服务器',
    'The Modding Tree\n\t\t\t\t\t\t\tDiscord': '模型树\n\t\t\t\t\t\t\tDiscord',
    'Please check the Discord to see if there are new content updates!': '请检查 Discord 以查看是否有新的内容更新！',
    'aqua': '水色',
    'AUTOMATION, INCOMPLETE': '自动化，不完整',
    'LAST, AUTO, INCOMPLETE': '最后，自动，不完整',
    'NONE': '无',
    'P: Reset for': 'P: 重置获得',
    '': '',
    '': '',

}


//需处理的前缀
var cnPrefix = {
    "(-": "(-",
    "(+": "(+",
    "(": "(",
    "-": "-",
    "+": "+",
    " ": " ",
    ": ": "： ",
    "\n": "",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": "",
    //树游戏
    "\t\t\t": "\t\t\t",
    "\n\n\t\t": "\n\n\t\t",
    "\n\t\t": "\n\t\t",
    "Show Milestones: ": "显示里程碑：",
    "Autosave: ": "自动保存: ",
    "Offline Prod: ": "离线生产: ",
    "Completed Challenges: ": "完成的挑战: ",
    "High-Quality Tree: ": "高质量树贴图: ",
    "Offline Time: ": "离线时间: ",
    "Theme: ": "主题: ",
    "Anti-Epilepsy Mode: ": "抗癫痫模式：",
    "In-line Exponent: ": "直列指数：",
    "Single-Tab Mode: ": "单标签模式：",
    "Time Played: ": "已玩时长：",
    "Current theme: ": "当前主题: ",
    "Auto max all: ": "自动全部最大: ",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需处理的后缀
var cnPostfix = {
    ":": "：",
    "：": "：",
    ": ": "： ",
    "： ": "： ",
    "/s)": "/s)",
    "/s": "/s",
    ")": ")",
    "%": "%",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": " ",
    "\n": "",
    "\n\t\t\t": "\n\t\t\t",
    "\t\t\n\t\t": "\t\t\n\t\t",
    "\t\t\t\t": "\t\t\t\t",
    "\n\t\t": "\n\t\t",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需排除的，正则匹配
var cnExcludeWhole = [
    /^(\d+)$/,
    /^\s*$/, //纯空格
    /^([\d\.]+)e(\d+)$/,
    /^([\d\.]+)$/,
    /^([\d\.]+)s$/,
    /^([\d\.]+)x$/,
    /^x([\d\.]+)$/,
    /^([\d\.,]+)$/,
    /^([\d\.,]+)x$/,
    /^x([\d\.,]+)$/,
    /^([\d\.]+)e([\d\.,]+)$/,
    /^x([\d\.]+)e([\d\.,]+)$/,
    /^([\d\.]+)e([\d\.,]+)x$/,
    /^[\u4E00-\u9FA5]+$/
];
var cnExcludePostfix = [
]

//正则替换，带数字的固定格式句子
//纯数字：(\d+)
//逗号：([\d\.,]+)
//小数点：([\d\.]+)
//原样输出的字段：(.+)
//换行加空格：\n(.+)
var cnRegReplace = new Map([
    [/^You are gaining (.+) elves per second$/, '你每秒获得 $1 精灵'],
    [/^You have (.+) singularity power, making all dimension multipliers x$/, '你有 $1 奇点力量，使所有维度乘数 x'],
    [/^You have (.+) ultrum power, translated to a$/, '你有 $1 超凡力量，转换为'],
    [/^You have (.+) cosmic power, translated to a$/, '你有 $1 宇宙力量，转换为'],
    [/^You have (.+) reality power, translated to a$/, '你有 $1 现实力量，转换为'],
    [/^You have (.+) eternity power, translated to a$/, '你有 $1 永恒力量，转换为'],
    [/^You have (.+) holy power, translated to a$/, '你有 $1 神圣力量，转换为'],
    [/^You have (.+) super power, translated to a$/, '你有 $1 超级力量，转换为'],
    [/^You have (.+) quantum power, translated to a$/, '你有 $1 量子力量，转换为'],
    [/^You have (.+) infinity power, translated to a$/, '你有 $1 无限力量，转换为'],
    [/^Get (.+) infinity points.$/, '获得 $1 无限点。'],
    [/^Get (.+) eternity points.$/, '获得 $1 永恒点。'],
    [/^Get (.+) quantum points.$/, '获得 $1 量子点。'],
    [/^You have (.+) money$/, '你有 $1 金钱'],
    [/^You have (.+) infinity points$/, '你有 $1 无限点'],
    [/^You have (.+) super points$/, '你有 $1 超级点'],
    [/^You have (.+) cosmic points$/, '你有 $1 宇宙点'],
    [/^You have (.+) reality points$/, '你有 $1 现实点'],
    [/^You have (.+) holy points$/, '你有 $1 神圣点'],
    [/^You have (.+) ultrum points$/, '你有 $1 超凡点'],
    [/^You have (.+) eternity points$/, '你有 $1 永恒点'],
    [/^You have (.+) quantum points$/, '你有 $1 量子点'],
    [/^Next at (.+) points$/, '下一个在 $1 点数'],
    [/^(\d+)th Dimension$/, '第 $1 维度'],
    [/^(\d+)th Reality Dimension$/, '第 $1 现实维度'],
    [/^(\d+)th Holy Dimension$/, '第 $1 神圣维度'],
    [/^(\d+)th Super Dimension$/, '第 $1 超级维度'],
    [/^(\d+)th Ultrum Dimension$/, '第 $1 超凡维度'],
    [/^(\d+)th Cosmic Dimension$/, '第 $1 宇宙维度'],
    [/^(\d+)th Infinity Dimension$/, '第 $1 无限维度'],
    [/^(\d+)th Eternity Dimension$/, '第 $1 永恒维度'],
    [/^(\d+)th Quantum Dimension$/, '第 $1 量子维度'],
	[/^([\d\.]+)\/sec$/, '$1\/秒'],
	[/^([\d\.,]+)\/sec$/, '$1\/秒'],
	[/^([\d\.]+)e([\d\.,]+)\/sec$/, '$1e$2\/秒'],
    [/^requires ([\d\.]+) more research points$/, '需要$1个研究点'],
    [/^([\d\.]+)e([\d\.,]+) points$/, '$1e$2 点数'],
    [/^([\d\.]+) elves$/, '$1 精灵'],
    [/^([\d\.]+)e([\d\.,]+) elves$/, '$1e$2 精灵'],
    [/^([\d\.,]+) elves$/, '$1 精灵'],
    [/^\*(.+) to electricity gain$/, '\*$1 到电力增益'],
    [/^Cost: (.+) points$/, '成本：$1 点数'],
    [/^Req: (.+) \/ (.+) elves$/, '成本：$1 \/ $2 精灵'],
    [/^Usages: (\d+)\/$/, '用途：$1\/'],
    [/^workers: (\d+)\/$/, '工人：$1\/'],

]);